package com.neusoft.shopping.manager.dao;

import com.neusoft.shopping.manager.entity.FlowEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class FlowDAOImpl {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    RowMapper<FlowEntity> rowMapper=new BeanPropertyRowMapper<>(FlowEntity.class);
    
    public List<FlowEntity> qureyAll(){
        String sql="select * from flowinfo;";
        return jdbcTemplate.query(sql,rowMapper);
    }
    
}
